<?php
/**
 *
 *
 *
 */
namespace Yz\modules\Users;
class Item_User
    extends \Yz\modules\Generic\Item_Default
    implements \Yz_Model_Interface
{

    /**
     *  @var Yz_Descriptor_Interface
     */
    protected static $descriptor;

    /**
     *
     */
    public function verifyPassword($password)
    {
        $password = \Yz_String::testNotEmpty($password);
        if ( $this->matchPassword($password) ) {

        } else {
            $ex = new \Yz_User_Exception();
            throw $ex;
        }
        return $this;
    }

    protected function matchPassword($password)
    {
        return md5($password) === $this->values['passwordMD5'];
    }

} // class
